<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >

  <DrawingImage x:Key="PauseIcon">
    <DrawingImage.Drawing>
      <DrawingGroup>
        <DrawingGroup.Children>
          <GeometryDrawing Brush="#80000000" Geometry="F1 M 481.85,414.667L 539.824,414.667C 540.846,414.667 541.675,415.401 541.675,416.307L 541.675,574.36C 541.675,575.266 540.846,576 539.824,576L 481.85,576C 480.828,576 480,575.266 480,574.36L 480,416.307C 480,415.401 480.828,414.667 481.85,414.667 Z "/>
          <GeometryDrawing Brush="#80000000" Geometry="F1 M 582.842,414.667L 640.816,414.667C 641.838,414.667 642.667,415.401 642.667,416.307L 642.667,574.36C 642.667,575.266 641.838,576 640.816,576L 582.842,576C 581.82,576 580.992,575.266 580.992,574.36L 580.992,416.307C 580.992,415.401 581.82,414.667 582.842,414.667 Z "/>
        </DrawingGroup.Children>
      </DrawingGroup>
    </DrawingImage.Drawing>
  </DrawingImage>

  <DrawingImage x:Key="PlayIcon">
    <DrawingImage.Drawing>
      <DrawingGroup>
        <DrawingGroup.Children>
          <GeometryDrawing Brush="#80000000" Geometry="F1 M 149.333,406L 149.333,598L 317.333,502L 149.333,406 Z "/>
        </DrawingGroup.Children>
      </DrawingGroup>
    </DrawingImage.Drawing>
  </DrawingImage>

  <LinearGradientBrush x:Key="ReflectionGradient" StartPoint="0,1" EndPoint="0,0">
    <LinearGradientBrush.GradientStops>
      <GradientStop Color="#80FFFFFF" Offset="0" />
      <GradientStop Color="#50FFFFFF" Offset="0.5" />
      <GradientStop Color="#80FFFFFF" Offset="0.5" />
      <GradientStop Color="#C0FFFFFF" Offset="1" />
    </LinearGradientBrush.GradientStops>
  </LinearGradientBrush>

  <RadialGradientBrush x:Key="HighlightGradient">
    <RadialGradientBrush.GradientStops>
      <GradientStop Color="#FFFF" Offset="0" />
      <GradientStop Color="#AFFF" Offset="0.3" />
      <GradientStop Color="#6FFF" Offset="0.6" />
      <GradientStop Color="#0FFF" Offset="1" />
    </RadialGradientBrush.GradientStops>
  </RadialGradientBrush>

  <TranslateTransform x:Key="trans_0_2" X="0" Y="2" />
  <TranslateTransform x:Key="trans_0_1" X="0" Y="1" />

  <BlurBitmapEffect x:Key="Blur3" Radius="3" />

  <!-- Button -->

  <Style x:Key="PlayButton" TargetType="{x:Type ToggleButton}">
    <Setter Property="Background" Value="#AAA" />
    <Setter Property="Foreground" Value="Black" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToggleButton}">

          <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ClipToBounds="False">

            <Ellipse Fill="{TemplateBinding Background}" />
            <Ellipse x:Name="Reflection" Fill="{StaticResource ReflectionGradient}" />
            <Ellipse x:Name="BlurBorder" Stroke="#60000000" StrokeThickness="1.5" BitmapEffect="{StaticResource Blur3}" />
            <Ellipse x:Name="ThinBorder" Stroke="#90000000" StrokeThickness="0.5" />
            <Ellipse x:Name="Highlight" Opacity="0" Margin="1" Fill="{DynamicResource HighlightGradient}" />

            <!-- Icon Image -->
            <Image 
              x:Name="Content" 
              Width="14" Height="14" 
              Margin="4,0,0,0" 
              Source="{StaticResource PlayIcon}"
              
                >
                            <Image.BitmapEffect>
                                <DropShadowBitmapEffect ShadowDepth="3" Softness="0.2" />
                            </Image.BitmapEffect>
                            </Image>
            
          </Grid>

          <ControlTemplate.Triggers>

            <Trigger Property="IsMouseOver" Value="True">
              <!-- <Setter TargetName="Highlight" Property="Opacity" Value="1" /> -->
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation 
                                            Storyboard.TargetName="Highlight" 
                                            Storyboard.TargetProperty="Opacity" 
                                            To="1" 
                                            Duration="0:0:0.2" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation 
                                            Storyboard.TargetName="Highlight" 
                                            Storyboard.TargetProperty="Opacity" 
                                            Duration="0:0:0.6" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>

            <Trigger Property="IsPressed" Value="True">
              <Setter TargetName="Reflection" Property="Fill" Value="#70FFFFFF" />
              <Setter TargetName="BlurBorder" Property="Stroke" Value="#A0000000" />
              <Setter TargetName="Content" Property="RenderTransform" Value="{StaticResource trans_0_1}" />
            </Trigger>

            <Trigger Property="IsChecked" Value="True">
              <Setter Property="Background" Value="Gold" />
              <Setter TargetName="Content" Property="Source" Value="{StaticResource PauseIcon}" />
              <Setter TargetName="Content" Property="Margin" Value="1,0,0,0" />
            </Trigger>
            
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Background" Value="#EBEDF3" />
              <Setter Property="Foreground" Value="Gray" />
              <Setter TargetName="Highlight" Property="Fill" Value="Transparent" />
            </Trigger>
            
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

</ResourceDictionary>
